'''
Created on 2011-7-26

@author: king
'''
import tornado.ioloop
import tornado.web

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Server status: OK")
        
class CoreHandler(tornado.web.RequestHandler):
    def get(self, protocal, service_type, service_name, service_method):
        userId = self.get_argument('userId')
        output = "You requested the service_type=" + service_type + ", service_name=" + service_name + ", service_method=" + service_method + " through protocao=" + protocal
        output += " userId=" + userId
        output += "\n"
        print self.request.arguments
        self.write(output)
    def post(self, protocal, service_type, service_name, service_method):
        print self.request.arguments
        print self.request.body
        pass
    
